﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace EasyMvc.Models
{
    [Table("Category")]
    public class Category
    {
        public int Id { get; set; }
        [StringLength(50)]
        [Required]
        public string Name { get; set; }
        public int ParentCategoryId { get; set; }
        [StringLength(500)]
        public string Path { get; set; }
        public DateTime? AddTime { get; set; }
        public int DocumentCount { get; set; }
        [StringLength(100)]
        public string Username { get; set; }
        [StringLength(200)]
        public string PictureUrl { get; set; }
        public int Hits { get; set; }
        public int Rating { get; set; }

        public virtual ICollection<Document> Documents { get; set; }
    }
}
